import request from '@/utils/request'
import qs from 'qs'

/** *******************        purch-schedule          ********************/

export function fetchScheduleList(query) {
  return request({
    url: '/purch/schedule/list',
    method: 'get',
    params: query
  })
}

export function fetchScheduleByIds(data) {
  return request({
    url: '/purch/schedule/list/ids',
    method: 'post',
    data
  })
}


export function fetchDateList(query) {
  return request({
    url: '/purch/schedule/date/list',
    method: 'get',
    params: query
  })
}

export function fetchOrder(id) {
  return request({
    url: `/rebate/order/info/${id}`,
    method: 'get'
  })
}

export function createBatch(data) {
  return request({
    url: '/purch/schedule/save/batch',
    method: 'post',
    data
  })
}